﻿using System;

namespace eLoop;

public sealed class DefaultEventSchedulerAllotter : ADefaultAllotter
{
    public DefaultEventSchedulerAllotter() : this(Environment.ProcessorCount * 2)
    {
    }

    public DefaultEventSchedulerAllotter(int count)
    {
        this.Schedulers = new ITaskScheduler[count];
        for (int i = 0; i < this.Schedulers.Length; i++)
        {
            this.Schedulers[i] = new SingleEventScheduler();
        }
    }

    protected override ITaskScheduler[] Schedulers
    {
        get;
    }
}
